package com.sky.mapper.user;

import com.sky.pojo.Merchant;
import com.sky.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    @Select("select * from user where openid=#{openId}")
    User selectByOpenId(String openId);

    //@Insert("insert into user values (null,#{openid},#{name},#{phone},#{sex},#{idNumber},#{avatar},#{createTime})")
    int save(User user);

    @Select("select * from merchant where id = #{id}")
    Merchant selectById(Long id);
}
